package com.feiyangedu.time;


import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class Main {

    public static void main(String[] args) throws Exception {
	// write your code here
        LocalDate d1 = LocalDate.now();
        System.out.println(d1);
        System.out.println("Week=" + d1.getDayOfWeek().getValue());

        // 注意11月＝11:
        LocalDate d2 = LocalDate.of(2016, 11,20);
        System.out.println(d2);

        LocalTime t1 = LocalTime.now();
        System.out.println(t1);
        LocalTime t2 = LocalTime.of(12,15,30);
        System.out.println(t2);

        LocalDateTime dt = LocalDateTime.now();
        System.out.println(dt);
        LocalDateTime dt2 = LocalDateTime.of(d2, t2);
        System.out.println(dt2);

    }
}
